<html lang="en"  xmlns:th="http://www.thymeleaf.org" >
<head th:include="frame/fm/res :: headerTableCss">
    <meta charset="UTF-8"/>
</head>
<head th:include="frame/fm/res :: uploadCSS"/>
<head>
    <style type="text/css">
        .form-row{
            float: left;
            width: 30%;
            padding: 20px;
        }
    </style>
    <script th:inline="JavaScript">
        var lessonId = [[${lessonId}]];
        var lessonType = [[${lessonType}]];
        var queryType=[[${queryType}]];
        var backUrl=[[${backUrl}]];
    </script>
</head>
<body>
<div>
    <!-- Main Content -->
    <div class="page-wrapper">
        <div class="container-fluid">
            <span th:replace="frame/fm/res :: breadcrumb"></span>
            <div class="pills-struct">
                <ul role="tablist" class="nav nav-pills" id="myTabs_9">
                    <li class="active" role="presentation">
                        <a aria-expanded="true" data-toggle="tab" role="tab" id="home_tab_9" href="#home_9">
                            <i class="icon-film-basic"></i>
                        </a>
                    </li>
                    <li role="presentation" class="">
                        <a data-toggle="tab" id="profile_tab_9" role="tab" href="#profile_9" aria-expanded="false">
                            <i id="profile_tab_9_type"></i>
                        </a></li>
                </ul>
                <div class="tab-content" id="myTabContent_9">
                    <div id="home_9" class="tab-pane fade active in" role="tabpanel">
                        <div class="row">
                            <div class="col-sm-12 col-xs-12 col-md-12 " style="background-color: white;">
                                <div class="form-wrap">
                                    <form onsubmit="return addLesson.commitAdd(this);" action="#"
                                          class="form-horizontal">
                                        <div class="form-group form-row" style="margin-left: 25px;">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">名称</font></div>
                                                <input type="text" class="form-control" placeholder="请输入课程名称"
                                                       name="lessonName" id="lessonName"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topCate">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">分类类型</font></div>
                                                <select class="form-control" name="categoryId" id="categoryId">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topHot">
                                            <div class="input-group">
                                                <div class="input-group">
                                                    <div class="input-group-addon">热点课程</div>
                                                    <div class="form-control" style="width: 235px;">
                                                        <div class="radio-inline pl-0" style="padding-top: 0px;">
                                                            <span class="radio radio-info">
                                                                <input type="radio" name="hot" id="radio_5" value="1"
                                                                       checked="checked"/>
                                                            <label for="radio_5">是</label>
                                                            </span>
                                                        </div>
                                                        <div class="radio-inline" style="padding-top: 0px;">
                                                            <span class="radio radio-info">
                                                                <input type="radio" name="hot" id="radio_6" value="0"/>
                                                            <label for="radio_6">否</label>
                                                            </span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topPayType">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">支付方式</font></div>
                                                <select class="form-control" name="payType" id="payType"></select>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topLessonDate">
                                            <div class="input-group">
                                                <div class="input-group-addon" id="upLessonDate"></div>
                                                <input type="text" class="form-control" maxlength="3" placeholder="请输入课程期数"
                                                       name="lessonDate" id="lessonDate" oninput = "value=value.replace(/[^\d]/g,'')"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topClassSize">
                                            <div class="input-group">
                                                <div class="input-group-addon" id="upClassSize"></div>
                                                <input type="tel" class="form-control" maxlength="4" placeholder=""
                                                       name="classSize" id="classSize" oninput = "value=value.replace(/[^\d]/g,'')"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;">
                                            <div class="input-group">
                                                <div class="input-group-addon">总价</div>
                                                <input type="text" class="form-control" placeholder="请输入总价"
                                                       name="price" id="price" onkeyup="this.value=this.value.toString().match(/^\d+(?:\.\d{0,2})?/)"/>
                                            </div>
                                        </div>

                                        <div class="form-group form-row" style="margin-left: 25px;" id="topStock">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">库存</font></div>
                                                <input type="text" class="form-control" placeholder="请输入预放库存"
                                                       name="stock" id="stock" oninput = "value=value.replace(/[^\d]/g,'')"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topStart">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">开始时间</font></div>
                                                <input type="date" id="startDate" class="form-control" placeholder="请输入开始时间"
                                                       name="startDate"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topEnd">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">结束时间</font></div>
                                                <input type="date" class="form-control" placeholder="请输入结束时间"
                                                       name="endDate" id="endDate"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;">
                                            <div class="input-group">
                                                <div class="input-group-addon">团购价</div>
                                                <input type="text" class="form-control" placeholder="请输入团购价格"
                                                       name="groupPrice" id="groupPrice" onkeyup="this.value=this.value.toString().match(/^\d+(?:\.\d{0,2})?/)"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;" id="topIsGrounding">
                                            <div class="input-group">
                                                <div class="input-group">
                                                    <div class="input-group-addon">是否上架</div>
                                                    <div class="form-control" style="width: 235px;">
                                                        <div class="radio-inline pl-0" style="padding-top: 0px;">
                                                            <span class="radio radio-info">
                                                                <input type="radio" name="state" id="radio_5" value="1"
                                                                       checked="checked"/>
                                                            <label for="radio_5">上架</label>
                                                            </span>
                                                        </div>
                                                        <div class="radio-inline" style="padding-top: 0px;">
                                                            <span class="radio radio-info">
                                                                <input type="radio" name="state" id="radio_6" value="0"/>
                                                            <label for="radio_6">否</label>
                                                            </span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;width: 45%;" id="topAddress">
                                            <div class="input-group">
                                                <div class="input-group-addon">上课地址</div>
                                                <input type="tel" class="form-control" placeholder="请输入课程上课地址"
                                                       name="address" id="address"/>
                                            </div>
                                        </div>

                                        <div class="form-group form-row" style="margin-left: 25px;width: 35%;" id="topTeacher">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">任课老师</font></div>
                                                <span class="col-md-12" style="width: 150%">
                                                        <input type="text" name="teacherName" id="teacherName"
                                                               readonly="readonly"
                                                               style="margin-left: -15px;border: 1px solid rgba(33, 33, 33, 0.12); border-radius: 0;color: #212121;font-size:14px;padding:6px 12px;background-color: #fff;box-shadow: none;width:75%;height: 42px;"
                                                               placeholder="请选择任课老师"/>
                                                        <input type="hidden" name="teacherId" id="teacherId"/>
                                                        <button type="button"
                                                                class="btn btn-primary btn-icon-anim btn-square btn-sm"
                                                                style="margin-left: 10px;width: 25%;"
                                                                onclick="addLesson.showAddLessonTeacher();"><i
                                                                class="icon-magic-wand-select"></i></button>
                                                    </span>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 25px;width: 90%;" id="topVideo">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">视频URL</font></div>
                                                <input type="text" class="form-control" placeholder="请输入URL地址"
                                                       name="videoUrl" id="videoUrl"/>
                                            </div>
                                        </div>
                                        <div class="form-group form-row" style="margin-left: 5px;width: 100%;">
                                            <!--<div class="input-group">-->
                                            <!--<div class="input-group-addon"><font color="red">描述</font></div>-->
                                            <!--<textarea class="form-control" rows="20" placeholder="请输入的描述"-->
                                            <!--name="mDesc" style="resize: none;height: 100px;"></textarea>-->
                                            <!--</div>-->
                                            <div style="margin-left: 15px;">课程富文本编辑</div>
                                            <!-- textarea编辑框 start-->
                                            <div id="textareaContent" class="panel-wrapper collapse in"  style="width: 800px;">
                                                <div class="panel-body">
                                                    <textarea class="tinymce"></textarea>
                                                </div>
                                            </div>
                                            <!-- textarea编辑框 end-->
                                        </div>

                                        <div class="form-group form-row" style="margin-left: 25px;width: 90%;" id="topUpImgs">
                                            <div>图片上传</div>
                                            <div class="case" id="lessonImgDiv" style="">
                                                <div class="upload" id='case' data-num="10" data-delUrl="/lesson/delLessonAtt" action="/lesson/addLessonAtt"></div>
                                            </div>
                                            <input type="hidden" id="ObjId"/>
                                            <!--<input type="hidden" id="ObjType"/>-->
                                        </div>

                                        <div class="form-group form-row" style="margin-left: 25px;width: 90%;" id="topPhoto">
                                            <div class="input-group">
                                                <div class="input-group-addon"><font color="red">图片URL</font></div>
                                                <input type="text" class="form-control" placeholder="请输入URL地址"
                                                       name="photo" id="photo"/>
                                            </div>
                                        </div>
                            <div class="form-actions mt-10">
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="row">
                                            <div class="col-md-offset-4 col-md-9" style="padding-bottom: 20px;">
                                                <button type="submit" id="commit" class="btn btn-primary btn-icon-anim btn-square btn-sm" style="width: 80px;"><i class="icon-heart-com"></i></button>
                                                <button type="button" id="cancel" class="btn btn-primary btn-icon-anim btn-square btn-sm" style="width: 80px;margin-left:20px"><i class="icon-shield-qx"></i></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
                    </div>

                        <div id="profile_9" class="tab-pane fade" role="tabpanel">
                            <div class="row">
                                <input type="hidden" id="lessonId" th:value="${lessonId}"/>
                                <input type="hidden" id="scheduleType" value="update"/>
                                <div class="col-sm-12">
                                    <div class="panel panel-default card-view">
                                        <div id="toolbar" class="row">
                                            <span class="col-md-6" style="width: auto;">
                                            <button onclick="addLesson.showAddLessonSchedule();"
                                                    class="btn btn-primary btn-icon-anim btn-square btn-sm"
                                                    style=" width: 80px;">
                                                <i class="icon-plus-add"></i>
                                            </button>
                                        </span>
                                        </div>
                                        <div class="panel-wrapper collapse in">
                                            <div class="panel-body">
                                                <div class="table-wrap">
                                                    <table id="tableList"></table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
        </div>
    </div>
</div>
<span th:include="frame/fm/res :: uploadJs"></span>
</body>
<script type="text/javascript" th:src="${application.staticUrl}+'base/lesson/addLesson.js'"></script>
<!--<script type="text/javascript" th:src="${application.staticUrl}+'base/lesson/updateLesson.js'"></script>-->
</html>